package com.wangijun.yuan.core.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wangijun.yuan.core.model.em.UserStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户信息
 */
@Schema(description = "用户信息")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_info")
public class UserInfo implements Serializable {
    /**
     * 用户ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "用户ID")
    private Long id;

    /**
     * 用户名
     */
    @TableField(value = "username")
    @Schema(description = "用户名")
    private String username;

    /**
     * 年龄
     */
    @TableField(value = "age")
    @Schema(description = "年龄")
    private Integer age;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    @Schema(description = "邮箱")
    private String email;

    /**
     * 头像
     */
    @TableField(value = "avatar")
    @Schema(description = "头像")
    private String avatar;

    /**
     * 个人简介
     */
    @TableField(value = "summary")
    @Schema(description = "个人简介")
    private String summary;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 修复时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "修复时间")
    private LocalDateTime updateTime;

    /**
     * 用户状态
     */
    @TableField(value = "user_status")
    @Schema(description = "用户状态")
    private UserStatusEnum userStatus;

    /**
     * 用户发布文章阅读量
     */
    @TableField(value = "read_num")
    @Schema(description = "用户发布文章阅读量")
    private Integer readNum;

    /**
     * 用户发布文章总数
     */
    @TableField(value = "art_count")
    @Schema(description = "用户发布文章总数")
    private Integer artCount;

    /**
     * 粉丝数量
     */
    @TableField(value = "fans_num")
    @Schema(description = "粉丝数量")
    private Integer fansNum;

    /**
     * 关注用户数量
     */
    @TableField(value = "fav_user_num")
    @Schema(description = "关注用户数量")
    private Integer favUserNum;

    /**
     * 用户收藏文章数量
     */
    @TableField(value = "fav_article_num")
    @Schema(description = "用户收藏文章数量")
    private Integer favArticleNum;

    /**
     * 主页地址
     */
    @TableField(value = "home_link")
    @Schema(description = "主页地址")
    private String homeLink;
    @Serial
    private static final long serialVersionUID = 1L;
}